package game.buildings;

/**
 *	@(#)Woodcutter.java
 *
 *	The <code>Woodcutter</code> class represents the woodcutter building.
 *	The woodcutter is a prodcuer building and provides wood.
 *
 *	@author Grzegorz Kobiela
 *	@version 1.0 2008/4/23
 */
public final class Woodcutter
extends Producer
{
	/**
	 *	Creates a new <code>Woodcutter</code> instance.
	 */
	public Woodcutter() {
		super(BuildingType.WOODCUTTER);
	}

	/**
	 *	Adds the given resource to the list of resources.
	 *	@param resource the resource
	 */
	@Override
	public void addResource(game.resources.Resource resource) {
		if(resource instanceof game.resources.Wood) {
			super.addResource(resource);
		} else {
			throw new IllegalArgumentException("Woodcutters do not produce " + resource + "!");
		}
	}
}